<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>INSPINIA | Dashboard</title>
    <script type="text/javascript" src="js/jquery-3.2.1.js"></script>
    <script type="text/javascript">
    	function dog() {
    		$.ajax({
    			url: './dogServlet',
    			type: 'post',
    			success: function(data) {
    				console.log(data);
    			}
    		});
    	}
     	function cat() {
    		$.ajax({
    			url: './catServlet',
    			type: 'post',
    			success: function(data) {
    				console.log(data);
    			}
    		});
    	}
     	function test() {
     		setInterval("dog()",5);
     	}
     	function test2() {
     		setInterval("cat()",5);
     	}
    </script>

</head>

<body>
<button onclick="test()">点我</button>
<button onclick="test2()">点我2</button>
123456
</body>
</html>
